﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

<html>
    <head>
        <script type="text/javascript">
            $(function () {
                $('#PaymentType').combobox({
                    url: '/PaymentHistory/GetPaymentType',
                    valueField: 'Name',
                    textField: 'Name'
                });
            });
            function searchPH() {
                $('#dg').datagrid('load', {
                    PaymentType: $('#PaymentType').combobox('getValue')
                });
            }
        </script>
    </head>
    <body>
        <table id="dg" title="Payment History Admin" class="easyui-datagrid" style="height:500px"
                url="/PaymentHistory/GetAllHistories"
                toolbar="#toolbar" pagination="true" iconCls="icon-ok"
                rownumbers="true" fitColumns="true" singleSelect="true">
            <thead>
                <tr>
                    <th field="PaymentId" width="50" hidden="true">PaymentId</th>
                    <th field="PaymentAmount" width="50">Payment Amount</th>
                    <th field="PaymentComment" width="50">Payment Comment</th>
                    <th field="PaymentDate" width="50">Payment Date</th>
                    <th field="PaymentResult" width="50">Payment Result</th>
                </tr>
            </thead>
        </table>
        <div id="toolbar" style="padding: 5px; height: auto">
            <div>
                Payment Type:
                <input class="easyui-combobox" type="text" id="PaymentType" name="PaymentType" />
                <a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-search'" onclick="searchPH()">Search</a>
            </div>
        </div>
    </body>
</html>
